//
//  YKLoginRegistered.m
//  百思不得姐
//
//  Created by Eric.Wu on 16/2/27.
//  Copyright © 2016年 Eric.Wu. All rights reserved.
//

#import "YKLoginRegistered.h"

@interface YKLoginRegistered ()
@property (weak, nonatomic) IBOutlet UIView *registeredView;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *leftMarginContans;

@end

@implementation YKLoginRegistered

- (void)viewDidLoad {
    [super viewDidLoad];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (IBAction)back
{
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (IBAction)loginRegistered:(UIButton *)button {
//    YKLog(@"%s",__func__);
    [self.view endEditing:YES];
    if (self.leftMarginContans.constant == 0) {
//            YKLog(@"%s0",__func__);
        
    [UIView animateWithDuration:3 animations:^{
        
            self.leftMarginContans.constant = -self.view.width;
        button.selected = YES;
        }];
    }else {
        [UIView animateWithDuration:3 animations:^{
            self.leftMarginContans.constant = 0;
            button.selected = NO;
        }];
    }
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
